﻿"use strict";
define(["service/service", "service/httpService"], function (service) {
    service.factory("authService", function ($location, httpService) {
        var methods = {
            register: function (params) {
                return httpService.post("/admin/account/register", params);
            },
            login: function (params) {
                return httpService.post("/admin/account/login", params);
            },
            change_pwd: function (params) {
                return httpService.post("/admin/account/change_pwd", params);
            },
            profile: function () {
                return httpService.post("/admin/account/profile");
            },
            save_profile: function (params) {
                return httpService.post("/admin/account/save_profile", params);
            },
            get_permission: function () {
                return httpService.get("/admin/account/permission");
            }
        }
        return methods;
    });
});